﻿using System;
using System.Collections.Generic;
using System.Text;
using System.Xml;

namespace KBEngine.Setting
{
    internal static class XmlExtension
    {
        public static bool TryGetValue(this XmlNode xmlNode, out string txt)
        {
            if (xmlNode != null && xmlNode.FirstChild != null)
            {
                txt = xmlNode.FirstChild.Value.Trim();
                return true;
            }
            else
            {
                txt = string.Empty;
                return false;
            }
        }
    }
}
